import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

// 注册VueRouter插件
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/about',
        name: 'About',
        component: () => import('../views/About.vue')
    }
    // ,
    // {
    //     path: '*',
    //     name: '404',
    //     props: true,
    //     component: () => import('../views/404.vue')
    // }
]

const router = new VueRouter({
    routes
})
export default router
